import http from "../utils/Http";
import { FileInfo } from '../model/FileInfoModel'

export const fileList = () => {
  return http<FileInfo[]>({
    method: 'post',
    url: '/oss/list'
  })
}

export const downloadFile = (data:FileInfo) => {
  return http<string>({
    method: 'post',
    url: '/oss/download',
    data: data
  })
}

export const deleteFile = (data:FileInfo) => {
  return http({
    method: 'post',
    url: '/oss/delete',
    data: data
  })
}